{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>代理列表</h5>
        </div>
        <div class="ibox-content">
            <!--搜索框开始-->           
            <div class="row">
                <div class="col-sm-12">   
                                            
                    <form name="admin_list_sea" class="form-search" method="post" action="{:url('zongdai')}">
                        <div class="col-sm-3">
                            <div class="input-group">
                                <input type="text" id="key" class="form-control" name="key" value="{$val}" placeholder="输入需查询的代理ID/账号/昵称/qq/微信" />   
                                <span class="input-group-btn"> 
                                    <button type="submit" class="btn btn-primary"><i class="fa fa-search"></i> 搜索</button> 
                                </span>
                            </div>
                        </div>
                    </form>
				<div  class="col-sm-4" style="width: 100px">
                    <div class="input-group" >
                        
                       <button class="btn btn-outline btn-primary" type="button" >昨日总跑统计：{$zonge}  元</button>
                    </div>                    </div>
                </div> 
                </div>
            </div>
            <!--搜索框结束-->
            <div class="hr-line-dashed"></div>
            <div class="example-wrap">
                {volist name="lists" id="vo"}
                    {if condition="$vo.zmoney gt 0"}
                        {if condition="$vo.status_zong == 1"}
                            <p style="width:100px;text-align:center;border:1px solid #aaaaaa; overflow: hidden;float:left;margin-left:12px;font-size:13px;font-weight:bold;background-color: #f0f75a;">{$vo.account}<br/> <span style="color:red">{$vo.zmoney}元</span></p>
                        {else}
                            <p style="width:100px;text-align:center;border:1px solid #aaaaaa; overflow: hidden;float:left;margin-left:12px;font-size:13px;font-weight:bold;">{$vo.account}<br/> <span style="color:red">{$vo.zmoney}元</span></p>
                        {/if}
                    {/if}
                {/volist}
                
            <!-- End Example Pagination -->
        </div>
    </div>
</div>
<!-- End Panel Other -->
</div>

<!-- 加载动画 -->
<div class="spiner-example">
    <div class="sk-spinner sk-spinner-three-bounce">
        <div class="sk-bounce1"></div>
        <div class="sk-bounce2"></div>
        <div class="sk-bounce3"></div>
    </div>
</div>

{include file="public/footer" /}

<script type="text/javascript">
   
    //laypage分页
    Ajaxpage();
    function Ajaxpage(curr){
        var key=$('#key').val();
        $.getJSON('{:url("Member/index")}', {page: curr || 1,key:key}, function(data){
            $(".spiner-example").css('display','none'); //数据加载完关闭动画 
            if(data==''){
                $("#list-content").html('<td colspan="20" style="padding-top:10px;padding-bottom:10px;font-size:16px;text-align:center">暂无数据</td>');
            }else{
                var tpl = document.getElementById('list-template').innerHTML;
                laytpl(tpl).render(data, function(html){
                    document.getElementById('list-content').innerHTML = html;
                });
                laypage({
                    cont: $('#AjaxPage'),//容器。值支持id名、原生dom对象，jquery对象,
                    pages:'{$allpage}',//总页数
                    skip: true,//是否开启跳页
                    skin: '#1AB5B7',//分页组件颜色
                    curr: curr || 1,
                    groups: 3,//连续显示分页数
                    jump: function(obj, first){
                        if(!first){
                            Ajaxpage(obj.curr)
                        }
                        $('#allpage').html('第'+ obj.curr +'页，共'+ obj.pages +'页');
                    }
                });
            }
        });
    }

//编辑代理
function edit_member(id){
    location.href = './edit_member/id/'+id+'.html';
}

//删除代理
function del_member(id){
    dashang.confirm(id,'{:url("del_member")}');
}

function del_member_txmoney(id){
    dashang.confirm(id,'/dsadmin/member/del_member_txmoney.html');
}

//用户代理
function member_status(id){
    dashang.status(id,'{:url("member_status")}');
}

</script>
</body>
</html>